import { IsNotEmpty } from 'class-validator'
import { IsNotExists } from '@/common/rule/is-no-exists.validate'
import { IsConfirmedRule } from '@/common/rule/is.confirm.pipe'

export default class RegisterDto {
  @IsNotEmpty({ message: '账号不能为空' })
  @IsNotExists('user', { message: '用户已注册' })
  name: string
  @IsNotEmpty({ message: '密码不能为空' })
  // @IsConfirmedRule({ message: '两次密码不一致' })
  password: string
  // password_confirmation: string
}
